package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysExpertsMapper;
import com.ruoyi.system.domain.SysExperts;
import com.ruoyi.system.service.ISysExpertsService;

/**
 * 专家资料Service业务层处理
 * 
 * @author riddou
 * @date 2022-04-11
 */
@Service
public class SysExpertsServiceImpl implements ISysExpertsService 
{
    @Autowired
    private SysExpertsMapper sysExpertsMapper;

    /**
     * 查询专家资料
     * 
     * @param expertId 专家资料主键
     * @return 专家资料
     */
    @Override
    public SysExperts selectSysExpertsByExpertId(Long expertId)
    {
        return sysExpertsMapper.selectSysExpertsByExpertId(expertId);
    }

    /**
     * 查询专家资料列表
     * 
     * @param sysExperts 专家资料
     * @return 专家资料
     */
    @Override
    public List<SysExperts> selectSysExpertsList(SysExperts sysExperts)
    {
        return sysExpertsMapper.selectSysExpertsList(sysExperts);
    }

    /**
     * 新增专家资料
     * 
     * @param sysExperts 专家资料
     * @return 结果
     */
    @Override
    public int insertSysExperts(SysExperts sysExperts)
    {
        sysExperts.setCreateTime(DateUtils.getNowDate());
        return sysExpertsMapper.insertSysExperts(sysExperts);
    }

    /**
     * 修改专家资料
     * 
     * @param sysExperts 专家资料
     * @return 结果
     */
    @Override
    public int updateSysExperts(SysExperts sysExperts)
    {
        sysExperts.setUpdateTime(DateUtils.getNowDate());
        return sysExpertsMapper.updateSysExperts(sysExperts);
    }

    /**
     * 批量删除专家资料
     * 
     * @param expertIds 需要删除的专家资料主键
     * @return 结果
     */
    @Override
    public int deleteSysExpertsByExpertIds(Long[] expertIds)
    {
        return sysExpertsMapper.deleteSysExpertsByExpertIds(expertIds);
    }

    /**
     * 删除专家资料信息
     * 
     * @param expertId 专家资料主键
     * @return 结果
     */
    @Override
    public int deleteSysExpertsByExpertId(Long expertId)
    {
        return sysExpertsMapper.deleteSysExpertsByExpertId(expertId);
    }
}
